#!/usr/bin/env python
import fileinput
import sys
import os

args = sys.argv[1:]
if len(args) <= 0:
    pass

for line in fileinput.input():
    sys.stdout.write(os.path.splitext(line)[1])

